package com.yanqu.road.server.cmd.relatives;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.relatives.RelativesProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.protocol.Protocol;
import com.yanqu.road.utils.YanQuMessageUtils;

@Cmd(code = Protocol.C_RELATIVES_GET_USER_INFO, desc = "拿玩家基础数据")
public class CrossGetUserBaseInfoCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        RelativesProto.CrossGetUserBaseInfoReqMsg reqMsg = RelativesProto.CrossGetUserBaseInfoReqMsg.parseFrom(packet.getBytes());
        MessageHelper.sendPacket(reqMsg.getServerId(), 0, YanQuMessageUtils.buildMessage(Protocol.S_RELATIVES_GET_USER_INFO_FROM_CROSS, reqMsg.toBuilder()));
    }

    @Override
    public void sendData() {

    }
}
